<template>
  <chart :auto-resize="true" :options="options"></chart>
</template>

<script>
import { graphic } from "echarts/lib/export";
export default {
  name: "water",
  props: ["title"],
  data() {
    return {
      options: {
        tooltip: {
          trigger: "axis",
        },

        grid: {
          top: 28,
          left: 10,
          right: 15,
          bottom: 0,
          containLabel: true,
        },
        xAxis: {
          type: "category",
          //   boundaryGap: true,
          data: ["8.1", "8.3", "8.5", "8.7", "8.9", "8.11", "8.13"],
          axisLine: {
            //y轴
            show: false,
          },
          axisTick: {
            //y轴刻度线
            show: false,
          },
          axisLabel: {
            show: true,
            textStyle: {
              color: "#527FB5",
            },
          },
        },
        yAxis: {
          type: "value",
          name: this.title,
          nameTextStyle: {
            color: "#fff",
            fontSize: 12,
            padding: [0, 0, 0, 40], // 四个数字分别为上右
          },
          max: 14,
          interval: 2, //每次增加几个

          //   scale: true,
          axisLine: {
            //y轴
            show: false,
          },
          axisTick: {
            //y轴刻度线
            show: false,
          },
          splitLine: {
            //网格线
            show: false,
          },
          axisLabel: {
            show: true,
            textStyle: {
              color: "#48EAFF",
              fontSize: 12,
            },
          },
        },
        series: [
          {
            type: "line",
            smooth: true,
            // symbol: "circle", //设定为实心点
            // symbolSize: 10, //设定实心点的大小
            itemStyle: {
              normal: {
                color: "#15EBC9", //改变折线点的颜色
                // lineStyle: {
                //   color: "#077D8C", //改变折线颜色
                // },
              },
            },

            areaStyle: {
              normal: {
                color: new graphic.LinearGradient(0, 0, 0, 1, [
                  { offset: 0, color: "#077D8C" },
                  { offset: 1, color: "rgba(38,197,254,0.00)" },
                ]),
              },
            },
            data: [11, 12, 10, 14, 13.2, 14, 10],
          },
        ],
      },
    };
  },
};
</script>
